<div class="gird_24 dpage">
    <div class="dcontent" style="padding: 28px 0">
        <div class="dbr5" style="
                    min-height: 400px;
                background: rgb(247,247,247);
        -webkit-box-shadow:  0px 0px 6px #000;
            -moz-box-shadow:  0px 0px 6px #000;
                        box-shadow:  0px 0px 6px #000;
                        ">
            <div style="padding:20px 0 0px 20px;position: relative">
                <div class="contactcontent" style="width: 940px;
margin-left: 0px;">
                    <div class="tit">
                        <h1>
                            Kinh doanh hợp tác
                        </h1>
                    </div>
                    
                    <div style="padding: 20px 0">
                        
                        <form id="frmconntact" name="frmconntact" action="?" method="post" onsubmit="contact();return;">
                        <div style="position: relative;height: 306px">
                            <div style="width: 460px;height: 212px;position: absolute;top: 0;left: 0">
                                <div class="putbox">
                                    <span>Họ và tên</span>
                                    <input id="txt-name" type="text" class="cyrle w300" value=""/>
                                </div>
                                <div class="putbox">
                                    <span>Điện thoại</span>
                                    <input id="txt-phone" type="text" class="cyrle w300" value=""/>
                                </div>
                                <div class="putbox">
                                    <span>Email</span>
                                    <input id="txt-email" type="text" class="cyrle w300" value=""/>
                                </div>
                                
                                <div class="putbox">
                                    <span>Địa chỉ</span>
                                    <input id="txt-address" type="text" class="cyrle w300" value=""/>
                                </div>
                                <div class="putbox">
                                    <span>Sản phẩm</span>
                                    <input id="txt-product" type="text" class="cyrle w300" value=""/>
                                </div>
                            </div>
                            <div style="width: 460px;height: 212px;position: absolute;left: 480px;top:0">
                                <div style="width: 160px;">
                                    <div class="putbox">
                                        <span>Số Lượng</span>
                                        <input id="txt-amount" type="text" class="cyrle w60" value=""/>
                                    </div>
                                </div>
                                <div style="width: 280px;position: absolute;top: 0;left: 180px">
                                    <div class="putbox">
                                        <span>Thời gian dự kiến</span>
                                        <input id="txt-date" type="text" class="cyrle w140" value=""/>
                                    </div>
                                </div>
                                <div style="position: relative;top:26px;" >
                                    Nội Dung<br/>
                                    <textarea class="cyrle" id="txt-content" style="position: absolute; top: 24px;width: 440px;height: 144px"></textarea>
                                </div>
                            </div>
                            <div class="demailbtn" onclick="contact();"></div>
                        </div>
                        </form>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function contact(){
        if(isrunning)return;
        var Name,Phone,Email,Address,Product,Amount,Date,Content;
        Name=$("#txt-name").val();
        Phone=$("#txt-phone").val();
        Email=$("#txt-email").val();
        Address=$("#txt-address").val();
        Product=$("#txt-product").val();
        Amount=$("#txt-amount").val();
        Date=$("#txt-date").val();
        Content=$("#txt-content").val();
        
        if(!_FcheckFilled(Name)){ $("#txt-name").focus();return; }
        if(!_FcheckFilled(Phone)){ $("#txt-phone").focus();return; }
        if(!_FcheckFilled(Email)){ $("#txt-email").focus();return; }
        if(!_FcheckEmail(Email)){ $("#txt-email").focus();return; }
        if(!_FcheckFilled(Address)){ $("#txt-address").focus();return; }
        if(!_FcheckFilled(Product)){ $("#txt-product").focus();return; }
        if(!_FcheckFilled(Content)){ $("#txt-content").focus();return; }
        
        isrunning=true;
        
        var url="{{base_url()}}home/contact";
        var data={
                params:{
                    Name:Name,
                    Phone:Phone,
                    Email:Email,
                    Address:Address,
                    Product:Product,
                    Amount:Amount,
                    Date:Date,
                    Content:Content
                }
            };
        AjaxKU(url,data,function(result){
            if(result.code<1){
                $.blockUI({ 
                    theme:     true, 
                    title:    'Thông báo', 
                    message:  $('div.uiWindow')

                });
                $('div.uiWindow .uicontent').html(result.msg);
            }else{
                $.blockUI({ 
                    theme:     true, 
                    title:    'Thông báo', 
                    message:  $('div.uiWindow')

                });
                $('div.uiWindow .uicontent').html(result.msg);
                document.frmconntact.reset();

            }
        });
    }
</script>